# Get current platform
ifeq ($(shell uname -m), x86_64)
  ARCH  = x86_64
else
  ARCH  = i386
endif

# Get current OS
  OS    = win32

# Variables
FPC     = fpc
FLAGS   = -O3 -XsX -CX -Sd
INCLUDE = -Fu../../src/
LIBS    = -Fu../../src/
OUTPUT  = ../../bin/
TMP     = ../../tmp/
UNIT    = MikuAnim.pas
TARGETW = MikuAnim.exe
BUNDLE  = $(OUTPUT)$(TARGETM).app

# Targets
all: clean
	$(FPC) $(UNIT) $(INCLUDE) $(LIBS) -FE$(OUTPUT) -FU$(TMP) $(FLAGS) -o$(TARGETW)
	strip $(OUTPUT)$(TARGETW) --strip-unneeded -R .comment -R .note

clean:
	rm -f *.*~
	rm -f $(TMP)*.*
